/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 3 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.


See LICENSE and AUTHORS for more information.
*/

#ifndef INPUTEDIT_H
#define INPUTEDIT_H

#include <QTextEdit>
#include <QKeyEvent>

/**
* @class InputEdit
* @brief The QTextEdit-input for chatWidget with modified keyPressEvent-handler
*
* This behaves like a QTextEdit, except that pressing the return button 
* doesnt insert a newline, but sends the message and clears the QTextEdit
*/
class InputEdit : public QTextEdit
{
    Q_OBJECT
public:
    InputEdit(QWidget *parent);
signals:
    void prepareMsg();
protected: 
    void keyPressEvent ( QKeyEvent * event  ) ;
};

#endif // INPUTEDIT_H
